package com.SpringBoot.product.pojo;

import java.math.BigDecimal;

import com.SpringBoot.product.dto.productDto;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author bxk
 * @since 2025-09-15
 */
@Data
@TableName("product")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "product_id", type = IdType.AUTO)
    private Integer productId;

    private String productName;

    /**
     * 单价
     */
    private BigDecimal price;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 简介
     */
    private String description;

    /**
     * 厂商外键
     */
    private Integer companyId;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    /**
     * 颜色
     */
    private String color;

    /**
     * 品牌
     */
    private Integer brandId;
    /**
     * 0-未删除 1-已删除
     * */
    private Integer isDeleted;
    /*
    * 商品图片地址
    * */
    private String address;

    public void setProductId(Integer productId) {
        this.productId = productId;
    }
    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public Integer getBrandId() {
        return brandId;
    }

    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    @Override
    public String toString() {
        return "Product{" +
            "productId=" + productId +
            ", productName=" + productName +
            ", price=" + price +
            ", stock=" + stock +
            ", description=" + description +
            ", companyId=" + companyId +
            ", createdAt=" + createdAt +
            ", updatedAt=" + updatedAt +
            ", color=" + color +
            ", brandId=" + brandId +
        "}";
    }
}
